﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ForumsEdit.ascx.cs" Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Forum.ForumsEdit" %>
<owc:OwDetailsView ID="ForumEditDv" runat="server" AutoGenerateRows="False" DataSourceID="ForumEditOds" DataKeyNames="ForumID"
    EnableModelValidation="True" OwNotificationID="" SkinID="DetailViewAdmin">
    <Fields>
        <asp:TemplateField>
            <InsertItemTemplate>
                <fieldset>
                    <legend>
                        <owc:OwR ID="GeneralInfo" runat="server" OwText="GeneralInfo"></owc:OwR>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup2" runat="server" OwBindContinentLocalityValue='<%# Bind("ContinentID") %>'
                            OwBindCountryLocalityValue='<%# Bind("CountryID") %>' OwBindProvinceLocalityValue='<%# Bind("ProvinceID") %>'
                            OwBindDistrictLocalityValue='<%# Bind("DistrictID") %>' OwBindWardLocalityValue='<%# Bind("WardID")%>'
                            OwBindCategoryValue='<%#Bind("CategoryID")%>' />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabel" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">     
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwUserName" runat="server" OwText="UserName" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtUser" runat="server" Enabled="False" Width="200px"
                                        OwUsedForEdit="False" Text='<%#Eval("UserID")!=null? (Membership.GetUser(Eval("UserID"))!=null?Membership.GetUser(Eval("UserID")).UserName:"n/a"):"n/a"  %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Membership.GetUser()!=null ? Membership.GetUser().ProviderUserKey:"" %>'
                                        ID="UserLabel" Visible="false" runat="server" Text='<%# Bind("UserID") %>' />
                                </td>
                            </tr>                                                   
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="TitleLabelOwR" runat="server" OwText="TitleLabel" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="OwTextBox" ID="txtTitle" runat="server" Width="680px" OwDefaultValue=""
                                        OwUsedForEdit="False" Text='<%# Bind("Title") %>' LabelWidth="">
                                    </owc:OwTextBox>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator1" runat="server"
                                        ErrorMessage=" <%$ OwR: TitleNotEmpty %>" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwDescriptionOwR" runat="server" OwText="DescriptionLabel" />
                                </td>
                                <td>
                                    <owc:OwEditor SkinID="owEditorFull" ID="txtDetail" runat="server" OwStoragePlace="Common" OwUsedTarget="Common" Style="position: relative;"
                                        Content='<%# Bind("Description") %>' >
                                    </owc:OwEditor>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator3" runat="server"
                                        ControlToValidate="txtDetail" ErrorMessage=" <%$ OwR: DetailNotEmpty %>"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            
                        </table>
                    </div>
                </fieldset>           
                <fieldset>
                    <legend>
                        <owc:OwR ID="ExInfoOwR" runat="server" OwText="ExInfoLable" ></owc:OwR>
                    </legend>
                    <table width="100%">
                        <tr>
                            <td class="leftcolumn">
                                <owc:OwR ID="IsDeletedOwR" runat="Server" OwText="IsDeleted" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCheckBox" runat="server" Checked='<%#Bind("IsDeleted")%>'
                                    CssClass="HiddenText" />
                            </td>
                        </tr>
                    </table>
                </fieldset>     
                <br />
                <br />
                <br />
                <br />
            </InsertItemTemplate>
            <EditItemTemplate>
                <fieldset>
                    <legend>
                        <owc:OwR ID="GeneralInfo" runat="server" OwText="GeneralInfo"></owc:OwR>
                    </legend>
                    <div>
                        <owac:OwDetailCommonGroup ID="OwDetailCommonGroup2" runat="server" OwBindContinentLocalityValue='<%# Bind("ContinentID") %>'
                            OwBindCountryLocalityValue='<%# Bind("CountryID") %>' OwBindProvinceLocalityValue='<%# Bind("ProvinceID") %>'
                            OwBindDistrictLocalityValue='<%# Bind("DistrictID") %>' OwBindWardLocalityValue='<%# Bind("WardID")%>'
                            OwBindCategoryValue='<%#Bind("CategoryID")%>' />
                    </div>
                </fieldset>
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabel" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwUserName" runat="server" OwText="UserName" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtUser" runat="server" Enabled="False" Width="200px"
                                        OwUsedForEdit="False" Text='<%#Eval("UserID")!=null? (Membership.GetUser(Eval("UserID"))!=null?Membership.GetUser(Eval("UserID")).UserName:"n/a"):"n/a"  %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Membership.GetUser()!=null ? Membership.GetUser().ProviderUserKey:"" %>'
                                        ID="UserLabel" Visible="false" runat="server" Text='<%# Bind("UserID") %>' />
                                </td>
                            </tr>
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="TitleLabelOwR" runat="server" OwText="TitleLabel" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="OwTextBox" ID="txtTitle" runat="server" Width="680px" OwDefaultValue=""
                                        OwUsedForEdit="False" Text='<%# Bind("Title") %>' LabelWidth="">
                                    </owc:OwTextBox>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator1" runat="server"
                                        ErrorMessage=" <%$ OwR: TitleNotEmpty %>" ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
                                </td>
                            </tr>                            
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwDescriptionOwR" runat="server" OwText="DescriptionLabel" />
                                </td>
                                <td>
                                    <owc:OwEditor SkinID="owEditorFull" ID="txtDetail" runat="server" 
                                        OwStoragePlace="Common" Style="position: relative;"
                                        Content='<%# Bind("Description") %>' >
                                    </owc:OwEditor>
                                    <asp:RequiredFieldValidator Text="*" ID="RequiredFieldValidator3" runat="server"
                                        ControlToValidate="txtDetail" ErrorMessage=" <%$ OwR: DetailNotEmpty %>">*</asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            
                        </table>
                    </div>
                </fieldset>      
                <fieldset>
                    <legend>
                        <owc:OwR ID="ExInfoOwR" runat="server" OwText="ExInfoLable" ></owc:OwR>
                    </legend>
                    <table width="100%">
                        <tr>
                            <td class="leftcolumn">
                                <owc:OwR ID="OwR1" runat="Server" OwText="IsDeleted" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="OwCheckBox1" runat="server" Checked='<%#Bind("IsDeleted")%>'
                                    CssClass="HiddenText" />
                            </td>
                        </tr>
                    </table>
                </fieldset>     
                <br />
                <br />
                <br />
                <br /> 
            </EditItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="EditUpdateThenCloseButton" runat="server" CommandName="Update"
                        Text='<%$OwR:Update %>' OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;
                    <owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                    </owc:OwConfirmButton>
                    &nbsp;<owc:OwButton ID="EditCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </EditItemTemplate>
            <InsertItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="InsertInsertButton" runat="server" CommandName="Insert" Text="<%$OwR:Insert %>"
                        OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;<owc:OwButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </InsertItemTemplate>
        </asp:TemplateField>
    </Fields>
</owc:OwDetailsView>
<owc:OwObjectDataSource ID="ForumEditOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwForumsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetEntity" TypeName="Micronet.OpenWeb.Com.BLL.OwForumsBLL" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:QueryStringParameter Name="ForumID" QueryStringField="<%$ Ow:OwConstants.QueryString.ID %>" />
    </SelectParameters>
</owc:OwObjectDataSource>
